import http from "@/utils/request";

export default {

  async getRoleListApi(params) {
    return await http.get("/api/role/selectList", params);
  },
  async addRoleApi(params) {
    return await http.post("/api/role/insert", params);
  },
  async updateRoleApi(params) {
    return await http.put("/api/role/update", params);
  },
  async deleteRoleApi(params) {
    return await http.delete("/api/role/delete", params);
  },
  /**
   *  查询分配权限树列表
   * @param params
   * @returns {Promise<AxiosResponse<any>>}
   */
  async getAssignTreeApi(params) {
    return await http.get("/api/role/getAssignPermissionTree", params);
  },
  /**
   * 分配权限
   * @param params
   * @returns {Promise<void>}
   */
  async assignSaveApi(params) {
    return await http.post("/api/role/saveRoleAssign", params);
  }

}
